home *** CD-ROM | disk | FTP | other *** search
- Subject: Saving weak refs. to other parts
- Sent: 9/18/96 4:16 AM
- Received: 9/18/96 4:16 AM
- From: Erlend Stav <Erlend.Stav@informatics.sintef.no>
- Reply-To: ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List
-
-
- We are making a suite of parts that can be connected to each other in
- various ways by the users. The connections is used in a "run-time" mode of
- the document to send messages between the parts (using extensions).
-
- I have been trying to figure out how to make this connetions persistent (the
- users do not want to reconnect all the parts each time the document is
- opened). I have found a solution that will save the references (using the
- weak reference to the other parts storage unit) that work when I do a normal
- save of the document.
-
- My problems start when I want this to function also during various cloning
- operations (i.e. "Save a copy"). I am using ODF for this work, but I think
- this is partly an ODF and partly an OD problem.
-
- 1. ODFs handling of CloneInto for non-embedding parts simply externalizes
- the content, and though there are parameters for cloning info it does not
- use them. Of course, I can override FW_Parts CloneInto and make a sollution
- like for embedding parts. But is there any specific reason why the default
- FW_Part behavior is different from the embedding parts?
-
- 2. This one is my -real- problem. During a cloning operation, I suppose that
- the right thing to do with my connected parts, is to use WeakClone. The
- documentation tells me that WeakClone will return an ID that I can use to
- get a weak reference -after- the cloning operation is finished; that is
- after EndClone if I understand it right. If my part started the cloning
- operation, this would be OK. But what happens in case of "Save as..." or if
- there is clipboard operation that invloves my part, but that was made from a
- part my part is embedded in? Possibly I have overlooked some detail here,
- but what I seem to miss is some sort of "PostClone" operation that lets my
- part check if the ID from WeakClone is valid after the cloning, and saves
- either the weak reference or a "NULL-tag" of some sort together with my
- "normal" content data.
-
- So, does anyone have an idea on how this could be done?
-
- - Erlend